import React, { Component } from 'react';
import { withRouter } from 'react-router-dom'

import searchIcon from '@/assets/icon/search.png'

import {
  SearchContainer
} from './style'

@withRouter
class index extends Component {
  goSearchPage = () => {
    this.props.history.push('/search')
  }
  render() {
    return (
      <SearchContainer onClick={this.goSearchPage}>
        <img src={searchIcon} alt="" />
        <span>想吃什么搜这里？如：徽菜</span>
      </SearchContainer>
    );
  }
}

export default index;
